package com.xin.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xin.entity.shop.ShopEntity;
import com.xin.entity.shop.dto.ShopRegisterDto;
import sun.security.provider.SHA;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 商户
 */
public interface ShopService extends IService<ShopEntity> {

    /**
     * 商户入驻
     * @param shopRegisterDto
     * @return
     */
    Integer settleIn(ShopRegisterDto shopRegisterDto);


    /**
     * 查看所有商家信息
     * @param page
     * @param size
     * @return
     */
    Page<ShopEntity> findAll(Integer page, Integer size);


    /**
     * 激活账号
     * @param token
     * @return
     */
    Integer activeAccount(String token);


    /**
     * 修改店铺信息
     * @param shopRegisterDto
     * @return
     */
    Integer updateShopMaterial(ShopRegisterDto shopRegisterDto);


    /**
     * 调用三分接口自动审核
     * @param shopEntity
     * @return
     */
    boolean autoAudit(ShopEntity shopEntity);


    /**
     * 根据用户的token获取店铺信息以及该店铺的管理员信息
     * @param token
     * @return
     */
    ShopRegisterDto findByToken(String token);


}
